#pragma once

#include "factory.h"

#include <iostream>


class Shape
{
public:
    virtual void draw() = 0;
    virtual ~Shape() {}
};



class Square : public Shape
{
public:
    virtual void draw() override
    {
        std::cout << "Square's draw\n";
    }
};
FactoryRegister<Shape, Square> square("square");



class Circle : public Shape
{
public:
    virtual void draw() override
    {
        std::cout << "Circle's draw\n";
    }
};
FactoryRegister<Shape, Circle> Circle("circle");



class Triangle : public Shape
{
public:
    virtual void draw() override
    {
        std::cout << "Triangle's draw\n";
    }
};
FactoryRegister<Shape, Triangle> triangle("triangle");
